package com.gopay.common.domain.cloud;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 云平台关联账户关系表
 * ZhangZG
 * 2015年12月29日 
 * www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "CLOUD_CUST_ACCT_REL")
public class CloudCustAcctRel implements Serializable {

	private static final long serialVersionUID = -2023752677676217510L;
	
	/**
	 * 序列
	 */
	private Integer sq;
	/**
	 * 合作方用户ID
	 */
	private String partnerUserId;
	/**
	 * 合作方ID,国付宝cust_id'
	 */
	private String partnerCustId;
	/**
	 * 合作方账号
	 */
	private String partnerAcctId;
	/**
	 * 关联合作方的商户,关联的cust_id
	 */
	private String custId;
	/**
	 * 关联合作方的商户云账户
	 */
	private String acctId;
	/**
	 * 协议号,合作方与子公司关联协议
	 */
	private String agreeId;
	/**
	 * 0:解除关联,1:关联
	 */
	private Integer stat;
	private Integer version;
	private Date createTs;
	private Date lastUpdTs;
	private String source;
    /**
     * 用户标识
     * 1 : 个人  2：企业
     */
	private String custType;

    /** 
     * 掌合身份证有效期通知标识 1-已通知 0-未通知 null-未通知
     */
    private String certTermNotify;
    
    /**
     * 云账户总账户号
     */
    private String mainCloudAcct;

	@Id
    @Column(name = "SQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "cloud_cust_acct_rel_seq")
    @SequenceGenerator(name = "cloud_cust_acct_rel_seq", allocationSize = 1, initialValue = 1, sequenceName = "cloud_cust_acct_rel_seq")
	public Integer getSq() {
		return sq;
	}
	public void setSq(Integer sq) {
		this.sq = sq;
	}
	
	@Column(name = "PARTNER_USER_ID")
	public String getPartnerUserId() {
		return partnerUserId;
	}
	public void setPartnerUserId(String partnerUserId) {
		this.partnerUserId = partnerUserId;
	}
	@Column(name = "PARTNER_CUST_ID")
	public String getPartnerCustId() {
		return partnerCustId;
	}
	public void setPartnerCustId(String partnerCustId) {
		this.partnerCustId = partnerCustId;
	}
	@Column(name = "PARTNER_ACCT_ID")
	public String getPartnerAcctId() {
		return partnerAcctId;
	}
	public void setPartnerAcctId(String partnerAcctId) {
		this.partnerAcctId = partnerAcctId;
	}
	@Column(name = "CUST_ID")
	public String getCustId() {
		return custId;
	}
	public void setCustId(String custId) {
		this.custId = custId;
	}
	@Column(name = "ACCT_ID")
	public String getAcctId() {
		return acctId;
	}
	public void setAcctId(String acctid) {
		this.acctId = acctid;
	}
	@Column(name = "AGREE_ID")
	public String getAgreeId() {
		return agreeId;
	}
	public void setAgreeId(String agreeId) {
		this.agreeId = agreeId;
	}
	@Column(name = "STAT")
	public Integer getStat() {
		return stat;
	}
	public void setStat(Integer stat) {
		this.stat = stat;
	}
	
	@Version
	@Column(name = "VERSION")
	public Integer getVersion() {
		return version;
	}
	public void setVersion(Integer version) {
		this.version = version;
	}
	@Column(name = "CREATE_TS")
	public Date getCreateTs() {
		return createTs;
	}
	public void setCreateTs(Date createTs) {
		this.createTs = createTs;
	}
	@Column(name = "LAST_UPD_TS")
	public Date getLastUpdTs() {
		return lastUpdTs;
	}
	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}
	
	@Column(name = "SOURCE")
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}

	@Column(name = "CUST_TYPE")
    public String getCustType() {
        return custType;
    }

    public void setCustType(String custType) {
        this.custType = custType;
    }
    
    @Column(name = "CERT_TERM_NOTIFY", length = 1)
    public String getCertTermNotify() {
        return certTermNotify;
    }
    public void setCertTermNotify(String certTermNotify) {
        this.certTermNotify = certTermNotify;
    }
    
}
